package com.candy.oop;

public class Test01 {
    public static void main(String[] args) {
//        父类指代子类
        Fruit f=new Apple();
        Fruit f2=new Watermelon();
        f.name="苹果";
        f2.name="西瓜";
        Juicer j=new Juicer();
        j.Juicing(f);
        j.Juicing(f2);




    }
}
